IconTheme: Clear caches when reloading theme
authorAlexander Larsson <alexl@redhat.com>
Wed, 19 Jun 2013 07:35:24 +0000 (09:35 +0200)
committerAlexander Larsson <alexl@redhat.com>
Wed, 19 Jun 2013 07:40:19 +0000 (09:40 +0200)
When we're reloading the theme in ensure_valid_themes (due to noticing
that a theme dir has changed) we need to also clear the icon cache
as it will not be valid for the new theme.

We already do this in do_theme_change(), but ensure_valid_themes()
was missing this.

https://bugzilla.gnome.org/show_bug.cgi?id=702598

gtk/gtkicontheme.c

index 66ea1742a6c0113162fb71a825a49d459450bd3e..4af25376e469d8f1bceb697d12c5dbfc7c4865dd 100644 (file)
@@ -1399,7 +1399,10 @@ ensure_valid_themes (GtkIconTheme *icon_theme)
 
       if (ABS (tv.tv_sec - priv->last_stat_time) > 5 &&
          rescan_themes (icon_theme))
-       blow_themes (icon_theme);
+        {
+          g_hash_table_remove_all (priv->info_cache);
+          blow_themes (icon_theme);
+        }
     }
   
   if (!priv->themes_valid)